<template>
    <view @tap="__e" class="item-scope data-v-217591f2" :data-event-opts="[['tap', [['toDetail', ['$event']]]]]" hoverClass="hover">
        <view class="header data-v-217591f2">
            <image class="headimg data-v-217591f2" mode="aspectFit" :src="info.user.headimg"></image>
            <view class="middle data-v-217591f2">
                <view class="name data-v-217591f2">{{ info.user.name }}</view>
                <view class="time data-v-217591f2">{{ $root.g0 + '发起' }}</view>
            </view>
            <view :class="['status', 'data-v-217591f2', info.union_status]">{{ '' + info.union_status_text + '' }}</view>
        </view>
        <view class="product-list data-v-217591f2">
            <view class="item data-v-217591f2" v-for="(item, index) in info.package_skus" :key="index">
                <image class="thumb data-v-217591f2" :src="item.thumb"></image>

                <view class="title data-v-217591f2">{{ '' + item.title + '' }}</view>

                <view class="titleTotal data-v-217591f2">{{ '(' + item.total + '件)' }}</view>
            </view>
        </view>
        <view class="bottom data-v-217591f2">
            <view class="left data-v-217591f2">
                共
                <label class="total _span data-v-217591f2">{{ productTotal }}</label>
                件 一口价
                <label class="price _span data-v-217591f2">
                    <price-display @__l="__l" class="data-v-217591f2" :info="info" vueId="e2e1d188-1"></price-display>
                </label>
            </view>
            <view class="right data-v-217591f2">
                <button @tap="__e" class="button buy bg-orange data-v-217591f2" :data-event-opts="[['tap', [['toDetail', ['$event']]]]]" v-if="info.union_status === 'pending'">
                    去购买
                </button>
                <button @tap="__e" class="button buy bg-cancel data-v-217591f2" :data-event-opts="[['tap', [['toDetail', ['$event']]]]]" v-else>查看</button>
            </view>
        </view>
    </view>
</template>

<script>
import priceDisplay from '@/components/PriceDisplay/PriceDisplay';
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['pages/resale/components/ResaleItem'],
    {
        '1f03': function (e, t, n) {
            'use strict';

            n.r(t);
            var o = n('7c4e');
            var a = n('e678');
            for (var c in a) {
                if (['default'].indexOf(c) < 0) {
                    (function (e) {
                        n.d(t, e, function () {
                            return a[e];
                        });
                    })(c);
                }
            }
            n('f741');
            var i = n('f0c5');
            var r = Object(i.a)(a.default, o.b, o.c, false, null, '217591f2', null, false, o.a, void 0);
            t.default = r.exports;
        },
        '7c4e': function (e, t, n) {
            'use strict';

            n.d(t, 'b', function () {
                return a;
            });
            n.d(t, 'c', function () {
                return c;
            });
            n.d(t, 'a', function () {
                return o;
            });
            var o = {
                PriceDisplay: function () {
                    return n.e('components/PriceDisplay/PriceDisplay').then(n.bind(null, '6b05'));
                }
            };
            var a = function () {
                this.$createElement;
                var e = (this._self._c, this.$tool.showShortTime(this.info.created_at));
                this.setData(
                    Object.assign(
                        {},
                        {
                            $root: {
                                g0: e
                            }
                        }
                    )
                );
            };
            var c = [];
        },
        c9d7: function (e, t, n) {},
        e678: function (e, t, n) {
            'use strict';

            n.r(t);
            var o = n('ff88');
            var a = n.n(o);
            for (var c in o) {
                if (['default'].indexOf(c) < 0) {
                    (function (e) {
                        n.d(t, e, function () {
                            return o[e];
                        });
                    })(c);
                }
            }
            t.default = a.a;
        },
        f741: function (e, t, n) {
            'use strict';

            var o = n('c9d7');
            n.n(o).a;
        },
        ff88: function (e, t, n) {
            'use strict';

            (function (e) {
                Object.defineProperty(t, '__esModule', {
                    value: true
                });
                t.default = void 0;
                var n = {
                    props: {
                        info: {
                            type: Object
                        }
                    },
                    components: {},
                    data: function () {
                        return {};
                    },
                    computed: {
                        productTotal: function () {
                            var e = 0;
                            this.info.package_skus.map(function (t) {
                                e += t.total;
                            });
                            return e;
                        }
                    },
                    filters: {},
                    created: function () {},
                    destroyed: function () {},
                    methods: {
                        toDetail: function () {
                            e.navigateTo({
                                url: '/pages/resale/detail?uuid=' + this.info.uuid
                            });
                        }
                    }
                };
                t.default = n;
            }.call(this, n('543d').default));
        }
    }
]);
(global.webpackJsonp = global.webpackJsonp || []).push([
    'pages/resale/components/ResaleItem-create-component',
    {
        'pages/resale/components/ResaleItem-create-component': function (e, t, n) {
            n('543d').createComponent(n('1f03'));
        }
    },
    [['pages/resale/components/ResaleItem-create-component']]
]);
</script>
<style>
@import './ResaleItem.css';
</style>
